<!--
Date: 2025-08-13
Copyright (c) 2025 CAX Conversion Project
-->
<template>
  <el-dialog v-model="dialogVisible" title="参数设置" width="600" :before-close="closeDialog">
    <el-form :model="parameterSettingFormData" label-position="top">
      <el-row :gutter="20">
        <el-col :span="11" class="b-1 b-#cccccc b-solid mr2 pt2 mb2">
          <el-form-item label="几何信息">
            <el-checkbox v-model="parameterSettingFormData.checkbox1" label="顶点坐标" />
          </el-form-item>
        </el-col>
        <el-col :span="11" class="b-1 b-#cccccc b-solid ml2 pt2 mb2">
          <el-form-item label="面或面片信息">
            <el-checkbox v-model="parameterSettingFormData.checkbox2" label="顶点索引" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="11" class="b-1 b-#cccccc b-solid mr2 pt2 mb2">
          <el-form-item label="法线向量">
            <el-checkbox-group v-model="parameterSettingFormData.checkbox3">
              <el-checkbox label="面法线向量" value="A" />
              <el-checkbox label="顶点法线向量" value="B" />
            </el-checkbox-group>
          </el-form-item>
        </el-col>
        <el-col :span="11" class="b-1 b-#cccccc b-solid ml2 pt2 mb2">
          <el-form-item label="颜色信息">
            <el-checkbox v-model="parameterSettingFormData.checkbox4" label="颜色属性" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="23" class="b-1 b-#cccccc b-solid pt2 mb2">
          <el-form-item label="材质属性">
            <el-checkbox-group v-model="parameterSettingFormData.checkbox5">
              <el-checkbox label="反射率" value="A" />
              <el-checkbox label="透明度" value="B" />
              <el-checkbox label="纹理映射" value="C" />
            </el-checkbox-group>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>

    <template #footer>
      <div class="dialog-footer text-center">
        <el-button @click="closeDialog">取消</el-button>
        <el-button type="primary" @click="closeDialog">保存</el-button>
      </div>
    </template>
  </el-dialog>
</template>

<script setup name="ParameterSettingDialog" lang="ts">
const dialogVisible = ref(false);
const parameterSettingFormData = ref({
  checkbox1: true,
  checkbox2: true,
  checkbox3: ['A', 'B'],
  checkbox4: true,
  checkbox5: ['A', 'B', 'C']
});
const openDialog = () => {
  dialogVisible.value = true;
};
const closeDialog = () => {
  dialogVisible.value = false;
};
defineExpose({
  openDialog,
  closeDialog
});
</script>
<style lang="scss" scoped>
:deep(.el-form-item__label) {
  color: #409eff;
}
:deep(.el-form-item__label)::before {
  content: '';
  display: inline-block;
  width: 2px;
  height: 15px;
  margin-right: 6px;
  background-color: #409eff;
}
</style>
